package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.MarketPostEntity;
import com.example.yunJie.digitalSentry.mapper.one.MarketPostMapper;
import com.example.yunJie.digitalSentry.service.MarketPostService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class MarketPostServiceImpl implements MarketPostService {


    private final MarketPostMapper marketPostMapper;

    @Override
    public int insert(MarketPostEntity marketPostEntity) {
        return marketPostMapper.insert(marketPostEntity);
    }

    @Override
    public int update(MarketPostEntity marketPostEntity) {
        return marketPostMapper.update(marketPostEntity);
    }

    @Override
    public int deleteById(String id) {
        return marketPostMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(List<Integer> idList) {
        return marketPostMapper.deleteIdList(idList);
    }

    @Override
    public MarketPostEntity findId(String id) {
        return marketPostMapper.findId(id);
    }

    @Override
    public List<MarketPostEntity> findAll(MarketPostEntity marketPostEntity) {
        return marketPostMapper.findAll(marketPostEntity);
    }

    @Override
    public MarketPostEntity find(String marketId, String postId) {
        return marketPostMapper.find(marketId,postId);
    }
}
